import request from '@/utils/request'

export function getdepartment() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 添加子部门
export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 获取部门信息
export function getDepartDetail(id) {
  return request({
    url: '/company/department/' + id,
    method: 'get'
  })
}
// 修改部门数据
export function updateDepartments(data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'put',
    data
  })
}
// 删除部门
export function delDepartment(id) {
  return request({
    url: '/company/department/' + id,
    method: 'delete'
  })
}

